import request from '@/utils/request'

// 查询优惠卷列表
export function listConpon(query) {
  return request({
    url: '/system/conpon/list',
    method: 'get',
    params: query
  })
}

// 查询优惠卷详细
export function getConpon(userConponId) {
  return request({
    url: '/system/conpon/' + userConponId,
    method: 'get'
  })
}

// 新增优惠卷
export function addConpon(data) {
  return request({
    url: '/system/conpon',
    method: 'post',
    data: data
  })
}

// 修改优惠卷
export function updateConpon(data) {
  return request({
    url: '/system/conpon',
    method: 'put',
    data: data
  })
}

// 删除优惠卷
export function delConpon(userConponId) {
  return request({
    url: '/system/conpon/' + userConponId,
    method: 'delete'
  })
}
